# 10.编写程序，使用列表生成式生成一个包含50个随机整数的列表，然后删除其中所有奇数
import random
numlist = [random.randint(1,100) for _ in range(50)]
print(numlist)
for num in numlist.copy():
    if num % 2 == 1:
        numlist.remove(num)

print(numlist)